package com.ruoyi.pcj.interfaces.app;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.pcj.service.IPcjPpRecordsService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 匹配逻辑优化：
 * 1.未匹配用户时候，把此次匹配加入等待队列，直至匹配到有符合的用户
 * 2.匹配到的用户，下次不会在匹配
 */
@AllArgsConstructor
@RestController
@RequestMapping("/wx/matching")
public class MatchingController {

    private IPcjPpRecordsService pcjPpRecordsService;
    /**
     * 获取当前用户的匹配结果
     *
     * @return
     */
    @PostMapping("/getMatchList")
    public AjaxResult getMatchList() {
        Object obj = pcjPpRecordsService.getMatchResult2();
        return AjaxResult.ok(obj);
    }


}

